<!-- 营销费用 -->
<template>
  <Card>
      <Row>
      <Col span="3">
        <List class="ivu-sidebar">
          <span v-for="item in sidebar" :key="item.id" @click="changeTab(item.address)">
            <ListItem :class="item.address === tabId ? 'ivu-active' : ''">{{ item.name }}</ListItem>
          </span>
        </List>
      </Col>
      <Col span="21">
      <component :is="tabId"></component>
      </Col>
    </Row>
  </Card>
</template>
<script>
import dailySpending from './dailySpending.vue'// 日消费
import weekSpending from './weekSpending.vue'// 周期消费
export default {
   components: {
      dailySpending,
      weekSpending,
  },
  data(){
    return{
      tabId: 'dailySpending',
      sidebar: [
          { id: 1, name: '日消费', address: 'dailySpending' },
          { id: 2, name: '周期消费', address: 'weekSpending' },
         
      ]
    }
  },
  methods:{
    initial(){
      //
    },
    changeTab (address) {
      this.tabId = address;
    }
  }
}
</script>